<?php

namespace app\shopConsole\validate;

use think\Validate;

class FerightSpecialValidate extends Validate
{
    protected $rule = [
        'freight_id|运费模板ID'   => 'require|number',
        'min_amount|初始运费'   => 'require|number',
        'per_amount|运费递增值' => 'require|number',
        'min_unit|初始量'       => 'require|number',
        'per_unit|递增量'       => 'require|number',
        'province|省'       => 'require',
    ];

    protected $scene = [
        'create' => ['freight_id', 'min_amount', 'per_amount', 'per_unit', 'min_unit', 'province'] ,
        'update' => ['freight_id', 'min_amount', 'per_amount', 'per_unit', 'min_unit', 'province'] ,
    ];

}